/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.kifas.ui.util;

import com.kifas.model.xml.KifasModelFactory;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Marshaller;

/**
 *
 * @author dhamarsu
 */
public class CommonUtils {
    public void getXmlFromModel(Object o){
        try {
               JAXBContext context = JAXBContext.newInstance(KifasModelFactory.class);
               Marshaller marshaller = context.createMarshaller();
               marshaller.marshal(o, System.out);
       } catch (JAXBException e) {
               e.printStackTrace();
       }
    }
}
